package com.taoyun.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.taoyun.pojo.entity.Group;
import com.taoyun.pojo.vo.GroupMember;
import com.taoyun.pojo.vo.GroupVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lkxicy
 * @since 2020-09-23
 * extends IService<Group>
 */
public interface IGroupService {

    //查询所属群组
    List<Group> ShowGroup(Integer AdminId);

    //通过UId和GroupId查询群信息，返回所有成员信息
    List<Group> ShowInformationOfGroup(Integer GroupId);

    //删除群组成员
    Integer DeleteUserOfGroup(Integer GroupId, List<Integer> Ids);

    //通过群组Id查询群组
    Group SelectGroupByIdAndUId(Integer GroupId,Integer uId);

    //创建群组
    Integer CreateGroup(Group group, Integer AdminId) throws IOException;

    //拉人进群
    Integer SelectUserIntoGroup(List<Integer> Ids,Integer GroupId,Integer uId);

    //修改群成员上传权限
    Integer ModifyUpPermission(Integer GroupId,List<Integer> Ids,String UpPermission);

    //修改群成员下载权限
    Integer ModifyDlPermission(Integer GroupId,List<Integer> Ids,String DlPermission);
    //修改群成员浏览查看权限
    Integer ModifyLPermission(Integer GroupId,List<Integer> Ids,String LPermission);
    //修改群成员删除权限
    Integer ModifyDPermission(Integer GroupId,List<Integer> Ids,String DPermission);
    //修改群成员重命名权限
    Integer ModifyRePermission(Integer GroupId,List<Integer> Ids,String RePermission);
    //修改群成员移动权限
    Integer ModifyMPermission(Integer GroupId,List<Integer> Ids,String MPermission);

    //删除群组
    Boolean DeleteGroup(Integer G_Id);

    //根据U_Id返回用户所加入群组的群编号GroupId
    List<Integer> ShowUserBelongGroup(@Param("U_Id") Integer U_Id);
}
